package com.ecoolex.hotel.saas.enums;

import com.ecoolex.framework.common.EnumInterface;
import com.ecoolex.framework.common.util.Check;

public enum PresaleCouponOrderOperateRecordType implements EnumInterface<PresaleCouponOrderOperateRecordType, Integer> {
	SUBMIT_ORDER(1, "提交订单"), 
	PAY_ORDER(2, "支付订单"), 
	VERIFY(3, "核销券"),
	CANCEL_VERIFY(4, "撤销核销券"),
	CANCEL_ORDER(5, "取消订单"),
	AUTO_CANCEL_ORDER(6, "自动取消订单"),
	APPLY_AFTER_SALES(7, "发起售后"),
	AGREE_AFTER_SALES(8, "同意售后"),
	REFUSE_AFTER_SALES(9, "拒绝售后"),
	USER_CANCEL_AFTER_SALES(10, "用户取消售后"),
	ADMIN_REFUND(11,"后台操作退款"),
	EXPIRE(12, "已过期");

	private int real;

	private String describe;

	private PresaleCouponOrderOperateRecordType(int real, String describe) {
		this.real = real;
		this.describe = describe;
	}

	@Override
	public Integer real() {
		return real;
	}

	@Override
	public String describe() {
		return describe;
	}

	@Override
	public PresaleCouponOrderOperateRecordType realOf(Integer real) {
		if (Check.notNull(real)) {
			for (PresaleCouponOrderOperateRecordType v : values()) {
				if (v.real().equals(real)) {
					return v;
				}
			}
		}
		return null;
	}
}
